package com.chen.exception;

import java.text.MessageFormat;

/**
 * @author: cgd
 * @description:
 * @date: 2022/4/13 14:24
 * @version: 1.0
 */
public interface BusinessExceptionAssert extends BaseExceptionEnum, Assert {
    @Override
    default BaseException newException(Object... args) {
        String msg = MessageFormat.format(this.getMessage(), args);
        return new BusinessException(this, msg);
    }

    @Override
    default BaseException newException(Throwable t, Object... args) {
        String msg = MessageFormat.format(this.getMessage(), args);
        return new BusinessException(this, msg, t);
    }
}